export enum RouterMode {
    HASH = 'hash',
    HISTORY = 'history'
}
export enum LogType {
    LOGIN = 0,
    PAGE = 1
}
export interface SiteAnalysisOption {
    siteAnalysisServer: string;
    appId: string;
    routerMode: RouterMode;
    interval: number;
    production: boolean;
}


export const createDefaultOption = (opt = {}): SiteAnalysisOption => {
    const defaultOption: SiteAnalysisOption = {
        siteAnalysisServer: 'https://auth-test.jxwrd.gov.cn/',
        appId: 'code',
        routerMode: RouterMode.HASH,
        interval: 10,
        production: false
    }
    return Object.assign(defaultOption, opt)
}

export const SAEvents = {
    INITED: 'inited',
    ERROR: 'error',
};
export type DBType = 'webSQL' | 'indexDB' | 'stroage';
